namespace FreeSwitch.EventSocket.Events.System
{
	/// <summary>
	/// Someone executed a command
	/// </summary>
	[EventName("API")]
	public class ApiEvent : Event
	{
		/// <summary>
		/// Gets executed command including parameters.
		/// </summary>
		public string Command { get; private set; }

		public override bool ParseCommand(string name, string value)
		{
			switch (name)
			{
				case "api-command":
					Command = value;
					break;
				default:
					return base.ParseCommand(name, value);
			}

			return true;
		}
	}
}